﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using COFE.Core;
using COFE.Core.Profile;
using COFE.Core.Entry;

namespace COFE.Core.Lister
{
    /// <summary>
    /// Modify entries that is returned by the primary volume, by appending virtual one or converting one to another
    /// </summary>
    public interface ISecondaryDirectoryLister : IDirectoryLister
    {
        /// <summary>
        /// Specify what kind of path is acceptable, you can use Regex masks or Extension (.zip).
        /// Use ".*" to accept all path.
        /// </summary>
        string[] ConvertableFileNamePatterns { get; }

        //Code for modify it's entrance for real file system.
        /// <summary>
        /// Convert a real file system FileInfoExA / DirectoryInfoExA to a virtual one, null if not convertable
        /// takes and return a primary property provider.
        /// </summary>
        IPropertyProvider ConvertEntry(IPropertyProvider primPropProvider, EntryConstructionFlags flags);


        /// <summary>
        /// Append extra folders / files when calling DirectoryInfoExA.GetDirectories()
        /// </summary>
        IEnumerable<IInternalFileSystemInfoExA> AppendEntries(IInternalDirectoryInfoExA parent);

        /// <summary>
        /// Construct a virtual directory (i.e. archive) in real or virtual filesystem.
        /// Return null of cannot create.
        /// </summary>
        IInternalDirectoryInfoExA CreateVirtualDirectory(IInternalDirectoryInfoExA parent, string dirName, string type);
    }
}
